Shader "DT URP/Unlit/Base" //Universal Render Pipeline/Unlit
{ 
    Properties
    {
        [MainTexture] _BaseMap("Texture", 2D) = "white" {}
        [MainColor] _BaseColor("Color", Color) = (1, 1, 1, 1)
        _Cutoff("AlphaCutout", Range(0.0, 1.0)) = 0.5

        // BlendMode
        _Surface("__surface", Float) = 0.0
        _Blend("__mode", Float) = 0.0
        _Cull("__cull", Float) = 2.0
        [ToggleUI] _AlphaClip("__clip", Float) = 0.0
        [HideInInspector] _BlendOp("__blendop", Float) = 0.0
        [HideInInspector] _SrcBlend("__src", Float) = 1.0
        [HideInInspector] _DstBlend("__dst", Float) = 0.0
        [HideInInspector] _SrcBlendAlpha("__srcA", Float) = 1.0
        [HideInInspector] _DstBlendAlpha("__dstA", Float) = 0.0
        [HideInInspector] _ZWrite("__zw", Float) = 1.0
        [HideInInspector] _AlphaToMask("__alphaToMask", Float) = 0.0

        // Editmode props
        _QueueOffset("Queue offset", Float) = 0.0

        // ObsoleteProperties
        [HideInInspector] _MainTex("BaseMap", 2D) = "white" {}
        [HideInInspector] _Color("Base Color", Color) = (0.5, 0.5, 0.5, 1)
        // [HideInInspector] _SampleGI("SampleGI", float) = 0.0 // needed from bakedlit
    }

    SubShader
    {
        Tags
        {
            "RenderType" = "Opaque"
            "IgnoreProjector" = "True"
            "UniversalMaterialType" = "Unlit"
            "RenderPipeline" = "UniversalPipeline"
        }
        LOD 100

        // -------------------------------------
        // Render State Commands
        Blend [_SrcBlend][_DstBlend], [_SrcBlendAlpha][_DstBlendAlpha]
        ZWrite [_ZWrite]
        Cull [_Cull]
        // LightMode Off
        

        HLSLINCLUDE
            #pragma target 2.0
            #define DT_URP_MODE

            #include "DTURPUtil.hlsl"

            // -------------------------------------
            // Material Keywords
            #pragma shader_feature_local_fragment _SURFACE_TYPE_TRANSPARENT
            #pragma shader_feature_local_fragment _ALPHATEST_ON
            #pragma shader_feature_local_fragment _ALPHAMODULATE_ON

            // -------------------------------------
            // Unity defined keywords
            #pragma multi_compile_fog
            #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
            #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
            #pragma multi_compile _ DEBUG_DISPLAY
            #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE
            
            #pragma multi_compile_fragment _ _WRITE_RENDERING_LAYERS
            // #pragma target 4.5 _WRITE_RENDERING_LAYERS

            //--------------------------------------
            // GPU Instancing
            #pragma multi_compile_instancing
         
            TEXTURE2D(_BaseMap);
            SAMPLER(sampler_BaseMap);

            CBUFFER_START(UnityPerMaterial)
                float4 _BaseMap_ST;
                half4 _BaseColor;
                half _Cutoff;
                half _Surface;
            CBUFFER_END
            //--------------------------------------
            // GPU Instancing
            #ifdef UNITY_DOTS_INSTANCING_ENABLED
                UNITY_DOTS_INSTANCING_START(MaterialPropertyMetadata)
                    UNITY_DOTS_INSTANCED_PROP(float4, _BaseColor)
                    UNITY_DOTS_INSTANCED_PROP(float , _Cutoff)
                    UNITY_DOTS_INSTANCED_PROP(float , _Surface)
                UNITY_DOTS_INSTANCING_END(MaterialPropertyMetadata)

                static float4 unity_DOTS_Sampled_BaseColor;
                static float  unity_DOTS_Sampled_Cutoff;
                static float  unity_DOTS_Sampled_Surface;

                void SetupDOTSUnlitMaterialPropertyCaches()
                {
                    unity_DOTS_Sampled_BaseColor     = UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float4, _BaseColor);
                    unity_DOTS_Sampled_Cutoff        = UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float , _Cutoff);
                    unity_DOTS_Sampled_Surface       = UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float , _Surface);
                }

                #undef UNITY_SETUP_DOTS_MATERIAL_PROPERTY_CACHES
                #define UNITY_SETUP_DOTS_MATERIAL_PROPERTY_CACHES() SetupDOTSUnlitMaterialPropertyCaches()

                #define _BaseColor          unity_DOTS_Sampled_BaseColor
                #define _Cutoff             unity_DOTS_Sampled_Cutoff
                #define _Surface            unity_DOTS_Sampled_Surface

            #endif

            //LOD_FADE_CROSSFADE 暂时不明白它的作用
            #if defined(LOD_FADE_CROSSFADE)
                #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
            #endif

            
        ENDHLSL

        Pass
        {
            Name "Unlit"
            // -------------------------------------
            // Render State Commands
            AlphaToMask[_AlphaToMask]

            HLSLPROGRAM
            #pragma target 2.0

            // -------------------------------------
            // Shader Stages
            #pragma vertex Vert
            #pragma fragment Frag  


            struct Attributes
            {
                float4 positionOS : POSITION;
                float2 uv : TEXCOORD0;
                // #if defined(DEBUG_DISPLAY)
                // float3 normalOS : NORMAL;
                // float4 tangentOS : TANGENT;
                // #endif
                UNITY_VERTEX_INPUT_INSTANCE_ID
            };

            struct Varyings
            {
                float2 uv : TEXCOORD0;
                float fogCoord : TEXCOORD1;
                float4 positionCS : SV_POSITION;
                // #if defined(DEBUG_DISPLAY)
                // float3 positionWS : TEXCOORD2;
                // float3 normalWS : TEXCOORD3;
                // float3 viewDirWS : TEXCOORD4;
                // #endif
                UNITY_VERTEX_INPUT_INSTANCE_ID
                UNITY_VERTEX_OUTPUT_STEREO
            };
 
            Varyings Vert(Attributes input)
            {
                Varyings output = (Varyings)0;

                UNITY_SETUP_INSTANCE_ID(input);
                UNITY_TRANSFER_INSTANCE_ID(input, output);
                UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);

                VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz);

                output.positionCS = vertexInput.positionCS;
                output.uv = TRANSFORM_TEX(input.uv, _BaseMap);


                #if defined(_FOG_FRAGMENT)
                output.fogCoord = vertexInput.positionVS.z;
                #else
                output.fogCoord = ComputeFogFactor(vertexInput.positionCS.z);
                #endif

                // #if defined(DEBUG_DISPLAY)
                // // normalWS and tangentWS already normalize.
                // // this is required to avoid skewing the direction during interpolation
                // // also required for per-vertex lighting and SH evaluation
                // VertexNormalInputs normalInput = GetVertexNormalInputs(input.normalOS, input.tangentOS);
                // half3 viewDirWS = GetWorldSpaceViewDir(vertexInput.positionWS);

                // // already normalized from normal transform to WS.
                // output.positionWS = vertexInput.positionWS;
                // output.normalWS = normalInput.normalWS;
                // output.viewDirWS = viewDirWS;
                // #endif

                return output;
            }

            void Frag(Varyings input, out half4 outColor : SV_Target0
                    #ifdef _WRITE_RENDERING_LAYERS
                        , out float4 outRenderingLayers : SV_Target1
                    #endif
            )
            {
                UNITY_SETUP_INSTANCE_ID(input);
                UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);

                half2 uv = input.uv;
                half4 texColor = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv);
                half3 color = texColor.rgb * _BaseColor.rgb;
                half alpha = texColor.a * _BaseColor.a;

                alpha = AlphaDiscard(alpha, _Cutoff);
                color = AlphaModulate(color, alpha);

            #ifdef LOD_FADE_CROSSFADE
                LODFadeCrossFade(input.positionCS);
            #endif
            
            
            #ifdef _DBUFFER
                ApplyDecalToBaseColor(input.positionCS, color);
            #endif

                half4 finalColor = half4(color.rgb, alpha);

            #if defined(_SCREEN_SPACE_OCCLUSION) && !defined(_SURFACE_TYPE_TRANSPARENT)
                float2 normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
                AmbientOcclusionFactor aoFactor = GetScreenSpaceAmbientOcclusion(normalizedScreenSpaceUV);
                finalColor.rgb *= aoFactor.directAmbientOcclusion;
            #endif

            #if defined(_FOG_FRAGMENT)
                #if (defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2))
                    float viewZ = -input.fogCoord;
                    float nearToFarZ = max(viewZ - _ProjectionParams.y, 0);
                    half fogFactor = ComputeFogFactorZ0ToFar(nearToFarZ);
                #else
                    half fogFactor = 0;
                #endif
            #else
                half fogFactor = input.fogCoord;
            #endif
                finalColor.rgb = MixFog(finalColor.rgb, fogFactor);
                finalColor.a = OutputAlpha(finalColor.a, IsSurfaceTypeTransparent(_Surface));

                outColor = finalColor;

            #ifdef _WRITE_RENDERING_LAYERS
                uint renderingLayers = GetMeshRenderingLayer();
                outRenderingLayers = float4(EncodeMeshRenderingLayer(renderingLayers), 0, 0, 0);
            #endif
            }
            ENDHLSL
        }

        Pass
        {
            Name "No Fog Unlit"

            // -------------------------------------
            // Render State Commands
            AlphaToMask[_AlphaToMask]

            HLSLPROGRAM
            #pragma target 2.0

            // -------------------------------------
            // Shader Stages
            #pragma vertex Vert
            #pragma fragment Frag
            
            struct Attributes
            {
                float4 positionOS : POSITION;
                float2 uv : TEXCOORD0; 
                UNITY_VERTEX_INPUT_INSTANCE_ID
            };

            struct Varyings
            {
                float2 uv : TEXCOORD0; 
                float4 positionCS : SV_POSITION; 
                UNITY_VERTEX_INPUT_INSTANCE_ID
                UNITY_VERTEX_OUTPUT_STEREO
            };
 
            Varyings Vert(Attributes input)
            {
                Varyings output = (Varyings)0;

                UNITY_SETUP_INSTANCE_ID(input);
                UNITY_TRANSFER_INSTANCE_ID(input, output);
                UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);

                VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz);

                output.positionCS = vertexInput.positionCS;
                output.uv = TRANSFORM_TEX(input.uv, _BaseMap);

                return output;
            }

            void Frag(Varyings input, out half4 outColor : SV_Target0
                    #ifdef _WRITE_RENDERING_LAYERS
                        , out float4 outRenderingLayers : SV_Target1
                    #endif
            )
            {
                UNITY_SETUP_INSTANCE_ID(input);
                UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);

                half2 uv = input.uv;
                half4 texColor = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv);
                half3 color = texColor.rgb * _BaseColor.rgb;
                half alpha = texColor.a * _BaseColor.a;

                alpha = AlphaDiscard(alpha, _Cutoff);
                color = AlphaModulate(color, alpha);

            #ifdef LOD_FADE_CROSSFADE
                LODFadeCrossFade(input.positionCS);
            #endif
            
            
            #ifdef _DBUFFER
                ApplyDecalToBaseColor(input.positionCS, color);
            #endif

                half4 finalColor = half4(color.rgb, alpha);

            #if defined(_SCREEN_SPACE_OCCLUSION) && !defined(_SURFACE_TYPE_TRANSPARENT)
                float2 normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
                AmbientOcclusionFactor aoFactor = GetScreenSpaceAmbientOcclusion(normalizedScreenSpaceUV);
                finalColor.rgb *= aoFactor.directAmbientOcclusion;
            #endif 
            finalColor.a = OutputAlpha(finalColor.a, IsSurfaceTypeTransparent(_Surface));

            outColor = finalColor;

            #ifdef _WRITE_RENDERING_LAYERS
                uint renderingLayers = GetMeshRenderingLayer();
                outRenderingLayers = float4(EncodeMeshRenderingLayer(renderingLayers), 0, 0, 0);
            #endif
            }
            ENDHLSL
        }

        

// ----------------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------------------------------------------------------------
// 
// 
// 
// 
// 
// 
// ----------------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------------------------------------------------------------

        // // Fill GBuffer data to prevent "holes", just in case someone wants to reuse GBuffer for non-lighting effects.
        // // Deferred lighting is stenciled out.
        // Pass
        // {
        //     Name "GBuffer"
        //     Tags
        //     {
        //         "LightMode" = "UniversalGBuffer"
        //     }

        //     HLSLPROGRAM
        //     #pragma target 4.5

        //     // Deferred Rendering Path does not support the OpenGL-based graphics API:
        //     // Desktop OpenGL, OpenGL ES 3.0, WebGL 2.0.
        //     #pragma exclude_renderers gles3 glcore

        //     // -------------------------------------
        //     // Shader Stages
        //     #pragma vertex UnlitPassVertex
        //     #pragma fragment UnlitPassFragment

        //     // -------------------------------------
        //     // Material Keywords
        //     #pragma shader_feature_local_fragment _ALPHATEST_ON
        //     #pragma shader_feature_local_fragment _ALPHAMODULATE_ON

        //     // -------------------------------------
        //     // Unity defined keywords
        //     #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
        //     #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
        //     #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE
        //     #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT

        //     #pragma multi_compile_fragment _ _WRITE_RENDERING_LAYERS
        //     #pragma target 4.5 _WRITE_RENDERING_LAYERS
        //     // #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"

        //     //--------------------------------------
        //     // GPU Instancing
        //     #pragma multi_compile_instancing
        //     // #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"

        //     // -------------------------------------
        //     // Includes
        //     #include "Packages/com.unity.render-pipelines.universal/Shaders/UnlitInput.hlsl"
        //     #include "Packages/com.unity.render-pipelines.universal/Shaders/UnlitGBufferPass.hlsl"
        //     ENDHLSL
        // }

        // Pass
        // {
        //     Name "DepthOnly"
        //     Tags
        //     {
        //         "LightMode" = "DepthOnly"
        //     }

        //     // -------------------------------------
        //     // Render State Commands
        //     ZWrite On
        //     ColorMask R

        //     HLSLPROGRAM
        //     #pragma target 2.0

        //     // -------------------------------------
        //     // Shader Stages
        //     #pragma vertex DepthOnlyVertex
        //     #pragma fragment DepthOnlyFragment

        //     // -------------------------------------
        //     // Material Keywords
        //     #pragma shader_feature_local _ALPHATEST_ON

        //     // -------------------------------------
        //     // Unity defined keywords
        //     #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE

        //     //--------------------------------------
        //     // GPU Instancing
        //     #pragma multi_compile_instancing 

        //     // -------------------------------------
        //     // Includes
        //     // #include "Packages/com.unity.render-pipelines.universal/Shaders/UnlitInput.hlsl"
        //     // #include "Packages/com.unity.render-pipelines.universal/Shaders/DepthOnlyPass.hlsl"

        //     #if defined(LOD_FADE_CROSSFADE)
        //         #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
        //     #endif
        //     #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RealtimeLights.hlsl"

        //     struct Attributes
        //     {
        //         float4 positionOS     : POSITION;
        //         float4 tangentOS      : TANGENT;
        //         float2 texcoord     : TEXCOORD0;
        //         float3 normal       : NORMAL;
        //         UNITY_VERTEX_INPUT_INSTANCE_ID
        //     };

        //     struct Varyings
        //     {
        //         float4 positionCS   : SV_POSITION;
        //         #if defined(_ALPHATEST_ON)
        //             float2 uv       : TEXCOORD1;
        //         #endif
        //         float3 normalWS     : TEXCOORD2;

        //         UNITY_VERTEX_INPUT_INSTANCE_ID
        //         UNITY_VERTEX_OUTPUT_STEREO
        //     };

        //     Varyings DepthNormalsVertex(Attributes input)
        //     {
        //         Varyings output = (Varyings)0;
        //         UNITY_SETUP_INSTANCE_ID(input);
        //         UNITY_TRANSFER_INSTANCE_ID(input, output);
        //         UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);

        //         #if defined(_ALPHATEST_ON)
        //             output.uv = TRANSFORM_TEX(input.texcoord, _BaseMap);
        //         #endif
        //         output.positionCS = TransformObjectToHClip(input.positionOS.xyz);

        //         VertexNormalInputs normalInput = GetVertexNormalInputs(input.normal, input.tangentOS);
        //         output.normalWS = NormalizeNormalPerVertex(normalInput.normalWS);

        //         return output;
        //     }

        //     void DepthNormalsFragment(
        //         Varyings input
        //         , out half4 outNormalWS : SV_Target0
        //     #ifdef _WRITE_RENDERING_LAYERS
        //         , out float4 outRenderingLayers : SV_Target1
        //     #endif
        //     )
        //     {
        //         UNITY_SETUP_INSTANCE_ID(input);
        //         UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);

        //         #if defined(_ALPHATEST_ON)
        //             Alpha(SampleAlbedoAlpha(input.uv, TEXTURE2D_ARGS(_BaseMap, sampler_BaseMap)).a, _BaseColor, _Cutoff);
        //         #endif

        //         #if defined(LOD_FADE_CROSSFADE)
        //             LODFadeCrossFade(input.positionCS);
        //         #endif

        //         #if defined(_GBUFFER_NORMALS_OCT)
        //         float3 normalWS = normalize(input.normalWS);
        //         float2 octNormalWS = PackNormalOctQuadEncode(normalWS);           // values between [-1, +1], must use fp32 on some platforms.
        //         float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5);   // values between [ 0,  1]
        //         half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS);      // values between [ 0,  1]
        //         outNormalWS = half4(packedNormalWS, 0.0);
        //         #else
        //         float3 normalWS = NormalizeNormalPerPixel(input.normalWS);
        //         outNormalWS = half4(normalWS, 0.0);
        //         #endif

        //         #ifdef _WRITE_RENDERING_LAYERS
        //             uint renderingLayers = GetMeshRenderingLayer();
        //             outRenderingLayers = float4(EncodeMeshRenderingLayer(renderingLayers), 0, 0, 0);
        //         #endif
        //     }
        //     ENDHLSL
        // }

        // Pass
        // {
        //     Name "DepthNormalsOnly"
        //     Tags
        //     {
        //         "LightMode" = "DepthNormalsOnly"
        //     }

        //     // -------------------------------------
        //     // Render State Commands
        //     ZWrite On

        //     HLSLPROGRAM
        //     #pragma target 2.0

        //     // -------------------------------------
        //     // Shader Stages
        //     #pragma vertex DepthNormalsVertex
        //     #pragma fragment DepthNormalsFragment

        //     // -------------------------------------
        //     // Material Keywords
        //     #pragma shader_feature_local _ALPHATEST_ON

        //     // -------------------------------------
        //     // Universal Pipeline keywords
        //     #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT // forward-only variant
        //     #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE
        //     #pragma multi_compile_fragment _ _WRITE_RENDERING_LAYERS
        //     #pragma target 4.5 _WRITE_RENDERING_LAYERS
        //     // #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"

        //     //--------------------------------------
        //     // GPU Instancing
        //     #pragma multi_compile_instancing
        //     // #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"

        //     //#pragma multi_compile_vertex _ ENABLE_VS_SKINNING

        //     // -------------------------------------
        //     // Includes
        //     // #include "Packages/com.unity.render-pipelines.universal/Shaders/UnlitInput.hlsl"
        //     #include "Packages/com.unity.render-pipelines.universal/Shaders/UnlitDepthNormalsPass.hlsl"
        //     ENDHLSL
        // }

        // // This pass it not used during regular rendering, only for lightmap baking.
        // Pass
        // {
        //     Name "Meta"
        //     Tags
        //     {
        //         "LightMode" = "Meta"
        //     }

        //     // -------------------------------------
        //     // Render State Commands
        //     Cull Off

        //     HLSLPROGRAM
        //     #pragma target 2.0

        //     // -------------------------------------
        //     // Shader Stages
        //     #pragma vertex UniversalVertexMeta
        //     #pragma fragment UniversalFragmentMetaUnlit

        //     // -------------------------------------
        //     // Unity defined keywords
        //     #pragma shader_feature EDITOR_VISUALIZATION

        //     // -------------------------------------
        //     // Includes
        //     // #include "Packages/com.unity.render-pipelines.universal/Shaders/UnlitInput.hlsl"
        //     // #include "Packages/com.unity.render-pipelines.universal/Shaders/UnlitMetaPass.hlsl"

        //     // #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UniversalMetaPass.hlsl"

        //     #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"

        //     struct Attributes
        //     {
        //         float4 positionOS   : POSITION;
        //         float3 normalOS     : NORMAL;
        //         float2 uv0          : TEXCOORD0;
        //         float2 uv1          : TEXCOORD1;
        //         float2 uv2          : TEXCOORD2;
        //         UNITY_VERTEX_INPUT_INSTANCE_ID
        //     };

        //     struct Varyings
        //     {
        //         float4 positionCS   : SV_POSITION;
        //         float2 uv           : TEXCOORD0;
        //     #ifdef EDITOR_VISUALIZATION
        //         float2 VizUV        : TEXCOORD1;
        //         float4 LightCoord   : TEXCOORD2;
        //     #endif
        //     };

        //     Varyings UniversalVertexMeta(Attributes input)
        //     {
        //         Varyings output = (Varyings)0;
        //         output.positionCS = UnityMetaVertexPosition(input.positionOS.xyz, input.uv1, input.uv2);
        //         output.uv = TRANSFORM_TEX(input.uv0, _BaseMap);
        //     #ifdef EDITOR_VISUALIZATION
        //         UnityEditorVizData(input.positionOS.xyz, input.uv0, input.uv1, input.uv2, output.VizUV, output.LightCoord);
        //     #endif
        //         return output;
        //     }

        //     half4 UniversalFragmentMeta(Varyings fragIn, MetaInput metaInput)
        //     {
        //     #ifdef EDITOR_VISUALIZATION
        //         metaInput.VizUV = fragIn.VizUV;
        //         metaInput.LightCoord = fragIn.LightCoord;
        //     #endif

        //         return UnityMetaFragment(metaInput);
        //     }

        //     half4 UniversalFragmentMetaUnlit(Varyings input) : SV_Target
        //     {
        //         MetaInput metaInput = (MetaInput)0;
        //         metaInput.Albedo = _BaseColor.rgb * SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, input.uv).rgb;

        //         return UniversalFragmentMeta(input, metaInput);
        //     }
        //     ENDHLSL
        // }
    }

    FallBack "Hidden/Universal Render Pipeline/FallbackError"
    CustomEditor "UnityEditor.Rendering.Universal.ShaderGUI.UnlitShader"
}
